<?php
$objUrl = new Url();
//echo $objUrl->getUrl();
if(($objUrl->getUrl()!='http://www.cladae.org/asamblea_cladea_2010/index.php?controller=cuenta&action=logout')&&($objUrl->getUrl()!='http://www.cladae.org/asamblea_cladea_2010/index.php?controller=cuenta&action=login')&&($objUrl->getUrl()!='http://www.cladae.org/asamblea_cladea_2010/index.php?controller=intranet&action=home')){
//if(($objUrl->getUrl()!='http://localhost/asamblea_cladea_2010/index.php?controller=cuenta&action=logout')&&($objUrl->getUrl()!='http://localhost/asamblea_cladea_2010/index.php?controller=cuenta&action=login')&&($objUrl->getUrl()!='http://localhost/asamblea_cladea_2010/index.php?controller=intranet&action=home')){

if(isset ($_SESSION['usuario_autenticado'])){
?>

<div id="header">
    <div id="header_left">
        User category: <strong><?php
            switch ($_SESSION['usuario_autenticado']->getIdPerfil()) {
                case 1:
                    echo "Administrador";
                    break;
                case 2:
                    echo "Autor";
                    break;
                case 3:
                    echo "Revisor";
                    break;
                case 4:
                    echo "Track Chair";
                    break;
            }
            ?></strong>

        <?php
        if($_SESSION['usuario_autenticado']->getIdPerfil()=="4"){            
            $objectTrack = new Track();
            $condition = " id_chair = ".$_SESSION['cuenta_data']->getIdChair();
            $vars['data_track_header'] = $objectTrack->listar($condition, 1, 1, 'nombre', 'DESC');
            $filas = $vars['data_track_header']['list'];
            //var_dump($filas);
            foreach($filas as $fila){
                echo "<br/>Track: <strong>".$fila->getNombre()."</strong>";
            }
        }
        ?>
    </div>

    <div id="header_right">
        User: <strong><?php echo $_SESSION['cuenta_data']->getNombre()." ".$_SESSION['cuenta_data']->getApellido();?></strong>
    </div>
</div>
<?php
}
}
?>